<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="vlms.bean.Movie"%>
<%@ page import="vlms.bean.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*" %>
<% 

Movie[] movieList=(Movie[])request.getAttribute("movieList");
IssuedMovie issuedMovie[]=(IssuedMovie[])request.getAttribute("issuedMovieList");


%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>List Issued Movies</title>
</head>
<body>
<table width="100%">
<%@ include file="/header.jsp" %>

<tr valign="top" height="50px">
<td align="center">
<%@ include file="/headerLinks.jsp" %>
</td>
</tr>

<% if(request.getAttribute("message") != null) { %>
<tr><td align="center" style="color:red"><%= request.getAttribute("message") %></td></tr>
<% } %>
<tr valign="top"><td align="center" height="300px">
<center>
<form id="Form" name="Form" method="POST" action="SearchMovie" onsubmit="return validate();">
<table>
<BR><BR>
<tr>
<td>
<H2>Movie Details</H2>
</td>
</tr>
<tr>
<td>

</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>


<div class="inputColumn" id="movieList"
			style="text-align: center; border: thin; margin: auto;">
			<table border="1">
				
				<%
				if(movieList!=null)
				{
						
						
				%>
				<tr>
					
					<td align="right">
					<label name="emailId" style="size: 30;">Movie name</label>
					</td>
					
					<td align="right">
					<label name="lastName" style="size: 30;">Category</label>
					</td>
					<td align="right">
					<label name="city" style="size: 30;">Issued Status</label>
					</td>
					<td align="right">
					<label name="state" style="size: 30;">Issued Date</label>
					</td>
					<td align="right">
					<label name="memType" style="size: 30;">Due Date</label>
					</td>
					
				</tr>
				
				<%
				
				for(int j=0;j<movieList.length;j++)
				{
					
				%>
<tr>
					
					<td align="right">
					<label name="emailId" style="size: 30;"><%=movieList[j].getMoviename() %></label>
					</td>
					
					<td align="right">
					<label name="lastName" style="size: 30;"><%=movieList[j].getCategory() %></label>
					</td>
					<td align="right">
					<label name="city" style="size: 30;"><%=issuedMovie[j].getIssuedstatus() %></label>
					</td>
					<%
					Calendar c= issuedMovie[j].getIssuedate();
					java.util.Date d=new java.util.Date(c.getTimeInMillis());
					
					
					Calendar c1= issuedMovie[j].getDuedate();
					java.util.Date d1=new java.util.Date(c1.getTimeInMillis());
					%>
					<td align="right">
					<label name="state" style="size: 30;"><%= new SimpleDateFormat("yyyy-mm-dd").format(d)%></label>
					</td>
					<td align="right">
					
					
					<label name="memType" style="size: 30;"><%=new SimpleDateFormat("yyyy-mm-dd").format(d1)%></label>
					</td>
					
					
				</tr>
				
				<%
				
					}
				}
				%>
		</table>
			</div>

</table>
</form>

</center>
<%@ include file="/bottom.html" %>
</table>
</body>
</html>